﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EClinic
{
	public partial class PatientEditor: UserControl
	{
		
		public PatientEditor()
		{
			
			InitializeComponent();
			txtmailtype.Visible = false;
			btnback.Visible = false;

		}

		private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
		{
			if (ddleducation.Text == "Primary" || ddleducation.Text == "Secondry" || ddleducation.Text == "University")
			{
				ddlocuption.SelectedText="Student";
			}
		}

		private void ddlmailtype_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
		{
			if (ddlmailtype.Text=="Other")
			{
				ddlmailtype.Visible = false;
				txtmailtype.Visible = true;
				btnback.Visible = true;
				
				txtmailtype.Controls[0].BringToFront();

			}
		}

		private void btnback_Click(object sender, EventArgs e)
		{
			
			txtmailtype.Visible = false;
			ddlmailtype.Visible = true;
			btnback.Visible = false;
			ddlmailtype.SelectedIndex = 0;
			ddlmailtype.ShowDropDown();
		  
		}

		private void radTextBox4_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Space)
			{
				
			   radTextBox4.Text= radTextBox4.Text.Replace(" ","");
				radTextBox3.Focus();
			}
		}

		private void radTextBox5_KeyDown(object sender, KeyEventArgs e)
		{
			
		}

		private void radTextBox3_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Space)
			{

				radTextBox3.Text = radTextBox3.Text.Replace(" ", "");
				radTextBox5.Focus();
			}
		}

        private void radPanelBarGroupElement4_Click(object sender, EventArgs e)
        {

        }

        private void PatientsEditorPanelBar_Click(object sender, EventArgs e)
        {

        }

        private void form_number_Click(object sender, EventArgs e)
        {

        }

        private void otherform_TextChanged(object sender, EventArgs e)
        {

        }

        private void radGroupBox4_Click(object sender, EventArgs e)
        {

        }

        private void Allergies_Click(object sender, EventArgs e)
        {

        }

        private void radTextBox7_TextChanged(object sender, EventArgs e)
        {

        }

        private void radTextBox9_TextChanged(object sender, EventArgs e)
        {

        }
	}
}
